import PixelMap from "@ohos.multimedia.image"
import { ValuesBucket } from '@kit.ArkData'

export interface ocrLoc {
  top: number,
  left: number,
  width: number,
  height: number
}
export enum ROLE {ASSISTANT, USER}
export class Message {
  content: string
  speaker: ROLE

  constructor(content: string, speaker: number) {
    this.content = content
    this.speaker = speaker
  }
}

export class MessagePaint {
  content: string
  speaker: number
  path: string

  constructor(content: string, speaker: number, path: string) {
    this.content = content
    this.speaker = speaker
    this.path = path
  }
}

export class Caption {
  words: string
  location: ocrLoc

  constructor(Caption1: Caption) {
    this.words = Caption1.words
    this.location = Caption1.location
  }
}

export class textMatchImg {
  hotcaps: Caption[]
  pix: PixelMap.PixelMap | null

  constructor(hotcaps: Caption[], pix: PixelMap.PixelMap | null = null) {
    this.hotcaps = hotcaps
    this.pix = pix
  }
}

export class textEmbImg {
  path: string
  sim: number
  type:string
  constructor(path: string, sim: number,type:string) {
    this.path = path
    this.sim = sim
    this.type=type
  }
}
// export interface Caption{
//
// }
export interface strCaptions {
  str: string,
  captions: Caption[]
}

export interface simOrig<T> {
  sim: number,
  origin: T,
  type:string
}

export interface ImgObj {
  pix: PixelMap.PixelMap,
  caps: Caption[],
  path: string
}

export interface DBtextEmb extends ValuesBucket {
  "content": string,
  "path": string,
  "vec": string
}

export interface IndexParams {
  voiceText: string,
  storedir: string,
  LLMss: string,
  ExecMode: boolean
  indexstart:indexStart|undefined
}
export interface indexStart{
  pageName:string,
  type:string,
  content:string
}
export interface DBtasksteps {
  "id": number,
  "name": string,
  "steps": string,
  "vec": string
}

export interface BoolObj {
  get: () => boolean,
  set: (val: boolean) => void,
  cond: boolean
}
